const pageConf = {
    data() {
        return {
            // 底部按钮列表
            footerMenu: [
                {
                    name: "产业提质", icon: "./img/index/cytz-icon.png",
                    children: [
                        { name: "高标准农田" },
                        { name: "产业园区" },
                    ],
                    showChildren: false
                },
                {
                    name: "乡村建设", icon: "./img/index/xcjs.png",
                    showChildren: false
                },
                {
                    name: "政策富民", icon: "./img/index/zcfm.png",
                    showChildren: false
                },
            ],
            // 地图弹框位置
            mapInfoWindowLeft: 0,
            // 地图点位信息显示隐藏
            mapInfoWindowShow: false,
            // 地图指向三角
            mapClipPath: ""
        }
    },
    methods: {
        /**
         * 地图点位点击
         */
        mapPointClick(params) {
            if (params.componentSubType == "scatter") {
                this.mapInfoWindowShow = true;
                this.$nextTick(() => {
                    let dom = document.querySelector(".map-info-window-left-arrow");
                    let percentage = ((Math.abs(params.event.offsetY - dom.offsetTop) / dom.offsetHeight) * 100).toFixed(0);
                    this.mapInfoWindowLeft = `calc(${params.event.offsetX}px + 5.5rem)`;
                    this.mapClipPath = `polygon(0 ${percentage}%, 100% 0, 100% 100%)`;
                })
                
            } else {
                this.mapInfoWindowShow = false;
            }
            
        }
    },
    mounted() {
        
    }
}